using System;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Timeline;

[Serializable]
public class EffectPlayableAsset : PlayableAsset,ITimelineClipAsset
{
    private readonly EffectPlayBehavior _EffectPlayBehavior = new EffectPlayBehavior();

    [HideInInspector]
    public EffectConfig Config;

    public ClipCaps clipCaps => throw new NotImplementedException();

    public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
    {
        //return Playable.Create(graph);
        var b =  ScriptPlayable<EffectPlayBehavior>.Create(graph, _EffectPlayBehavior);
        var clone = b.GetBehaviour();
        clone.Config = Config;
        return b;

    }


}
  